From 3f5abf0ed3349624bc668bf38af7bf80ec6e992d Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Thu, 6 Jul 2006 10:42:13 -0600 Subject: [PATCH] [IA64] Fix MINSTATE_GET_CURRENT To get virtual curent address in both physcal mode and virtual mode, add MINSTATE_GET_CURRENT_VIRT. Signed-off-by: Akio Takebe --- xen/arch/ia64/linux-xen/minstate.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xen/arch/ia64/linux-xen/minstate.h b/xen/arch/ia64/linux-xen/minstate.h index 69786cee0f..b229b2d417 100644 --- a/xen/arch/ia64/linux-xen/minstate.h +++ b/xen/arch/ia64/linux-xen/minstate.h @@ -89,6 +89,7 @@ # define MINSTATE_GET_CURRENT(reg) \ movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;; \ ld8 reg=[reg] +# define MINSTATE_GET_CURRENT_VIRT(reg) MINSTATE_GET_CURRENT(reg) #else # define MINSTATE_GET_CURRENT(reg) mov reg=IA64_KR(CURRENT) #endif @@ -97,7 +98,19 @@ #endif #ifdef MINSTATE_PHYS +# ifdef XEN +# define MINSTATE_GET_CURRENT(reg) \ + movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;; \ + tpa reg=reg;; \ + ld8 reg=[reg];; \ + tpa reg=reg;; +# define MINSTATE_GET_CURRENT_VIRT(reg) \ + movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;; \ + tpa reg=reg;; \ + ld8 reg=[reg];; +#else # define MINSTATE_GET_CURRENT(reg) mov reg=IA64_KR(CURRENT);; tpa reg=reg +#endif /* XEN */ # define MINSTATE_START_SAVE_MIN MINSTATE_START_SAVE_MIN_PHYS # define MINSTATE_END_SAVE_MIN MINSTATE_END_SAVE_MIN_PHYS #endif @@ -200,8 +213,8 @@ ;; \ .mem.offset 0,0; st8.spill [r16]=r13,16; \ .mem.offset 8,0; st8.spill [r17]=r21,16; /* save ar.fpsr */ \ - /* XEN mov r13=IA64_KR(CURRENT);*/ /* establish `current' */ \ - MINSTATE_GET_CURRENT(r13); /* XEN establish `current' */ \ + /* XEN mov r13=IA64_KR(CURRENT);*/ /* establish `current' */ \ + MINSTATE_GET_CURRENT_VIRT(r13); /* XEN establish `current' */ \ ;; \ .mem.offset 0,0; st8.spill [r16]=r15,16; \ .mem.offset 8,0; st8.spill [r17]=r14,16; \ -- 2.30.2